package springMVC.connect;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author quan
 * @Description 支持Get请求的三种方法
 * @Date 2023/7/21 11:35
 */
@RestController
@RequestMapping("/web")
public class Demo4_GetThreeWays {
//    @RequestMapping("/index4")  // 写法1 post和get都支持
    @RequestMapping(value = "/index4",method = RequestMethod.GET) //写法2 支持get
//    @GetMapping("/index4") 支持get
    public String index(){
        return "/index.html";
    }
}
